<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>淘宝</title>
	</head>
	<body>
		<form action="#" method="post">
			<input id="checkAll" type="checkbox" name="aa" value="全选"/>全选
			<input type="checkbox" name="aa" value="1"/>1
			<input type="checkbox" name="aa" value="2"/>2
			<input type="checkbox" name="aa" value="3"/>3
			<input type="checkbox"name="aa" value="4"/>4
			<input type="checkbox" name="aa" value="5"/>5
			
		</form>
		<script src="jquery-1.12.4.js" type="text/javascript"></script>
		<script type="text/javascript">
       $(function() {
           $("#checkAll").click(function() {
                $('input[name=aa]').prop("checked",this.checked); 
            });
      
        });
		</script>
	</body>
</html>
